package com.data.modules.emp.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zhangzhiwei
 * @since 2020-06-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wk_admin_user")
@ApiModel(value="AdminUser对象", description="用户表")
public class AdminUserBo implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "安全符")
    private String salt;

    @ApiModelProperty(value = "头像")
    private String img;

    @ApiModelProperty(value = "真实姓名")
    private String realname;

    @ApiModelProperty(value = "员工编号")
    private String num;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "0 未选择 1 男 2 女 ")
    private Integer sex;

    @ApiModelProperty(value = "部门")
    private Integer deptId;

    @ApiModelProperty(value = "部门名称")
    @TableField(exist = false)
    private String deptName;

    @ApiModelProperty(value = "岗位")
    private String post;

    @ApiModelProperty(value = "状态,0禁用,1正常,2未激活")
    private Integer status;

    @ApiModelProperty(value = "直属上级ID")
    private Long parentId;

    @ApiModelProperty(value = "最后登录时间")
    private Date lastLoginTime;

    @ApiModelProperty(value = "最后登录IP 注意兼容IPV6")
    private String lastLoginIp;


    @TableField(exist = false)
    private String companyName;
    @TableField(exist = false)
    @ApiModelProperty("所属站点")
   private String stationName;
    @TableField(exist = false)
    @ApiModelProperty("用户身份 0 站长   1内荐员工   2  合作商")
    private Integer identity;
    @ApiModelProperty("是否删除 0 未删除 1 已删除")
    private Integer isDel;

     @ApiModelProperty("用户昵称")
    private String nickname;

    @ApiModelProperty("用户类型：0-crm用户，可以登录系统具有分配的权限 1-站长用户，不能登录系统但具有指定接口访问权限 2-趣用工后台创建 ")
    private Integer userType;

    @ApiModelProperty("用户身份證")
    private String idCard;

    @ApiModelProperty("余额")
    private BigDecimal balance;

    @ApiModelProperty("（劳动者）来源控制 以，隔离")
    private String sourceLabors;
    @ApiModelProperty("（劳动者）城市控制 以，隔离")
    private String cityCodes;

    @ApiModelProperty("职级")
    private String rank;

    @ApiModelProperty(value = "入职时间")
    private Date entryTime;

    @ApiModelProperty(value = "离职时间")
    private Date depaTime;

    @TableField(exist = false)
    @ApiModelProperty("用户身份 返回  可能为多个")
    private Set<Integer> identitys;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;


}
